﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Visa.DB;

namespace VisaApp.Models
{
    public class TinOfMenuModel
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public string Description { get; set; }
        public string Images { get; set; }
        public string DescriptFull { get; set; }
        public Nullable<System.DateTime> DateCreate { get; set; }
        public Nullable<bool> Status { get; set; }
        public Nullable<int> CateId { get; set; }
        public Nullable<bool> Deleted { get; set; }
        public string MetaKeywords { get; set; }
        public string MetaDescription { get; set; }
        public string MetaTitle { get; set; }
        public string SearchName { get; set; }
        public string Trangthai { get; set; }
        public Nullable<bool> ALowHome { get; set; }

        public static void MapForm(TinofMenu entity, ref TinOfMenuModel model)
        {
            model.Id = entity.Id;
            model.Name = entity.Name;
            model.Images = entity.Images;
            model.Description = entity.Description;
            model.DescriptFull = entity.DescriptFull;
            model.DateCreate = entity.DateCreate;
            model.Status = entity.Status;
            model.CateId = entity.CateId;
            model.Deleted = entity.Deleted;
            model.MetaKeywords = entity.MetaKeywords;
            model.MetaDescription = entity.MetaDescription;
            model.MetaTitle = entity.MetaTitle;
            model.SearchName = entity.SearchName;
            model.ALowHome = entity.ALowHome;

        }

        public static void MapForm(TinOfMenuModel model, ref TinofMenu entity)
        {
            entity.Id = model.Id;
            entity.Name = model.Name;
            entity.Images = model.Images;
            entity.Description = model.Description;
            entity.DescriptFull = model.DescriptFull;
            entity.DateCreate = model.DateCreate;
            entity.Status = model.Status;
            entity.CateId = model.CateId;
            entity.Deleted = model.Deleted;
            entity.MetaKeywords = model.MetaKeywords;
            entity.MetaDescription = model.MetaDescription;
            entity.MetaTitle = model.MetaTitle;
            entity.SearchName = model.SearchName;
            entity.ALowHome = model.ALowHome;
        }
    }
}